import { Model } from 'mongoose';
import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';

@Injectable()
export class TenantService {
  constructor(@InjectModel('Tenant') private readonly TenantModel) {}

  async create(createDto): Promise<any> {
    const createdTenant = new this.TenantModel(createDto);
    return await createdTenant.save();
  }
}